# Contributor: dai9ah <dai9ah@protonmail.com>
# Maintainer: dai9ah <dai9ah@protonmail.com>
pkgname=btfs
pkgver=2.24
pkgrel=12
pkgdesc="Bittorrent filesystem based on FUSE"
options="!check" # No testsuite
url="https://github.com/johang/btfs"
arch="all !armhf" # blocked by libtorrent-rasterbar
license="GPL-3.0-or-later"
depends="python3"
makedepends="autoconf automake curl-dev fuse-dev libtorrent-rasterbar-dev boost-dev"
subpackages="$pkgname-doc"
source="btfs-$pkgver.tar.gz::https://github.com/johang/btfs/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vfi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
33339d9eefe6836c8c96c4ea0fb6ee99150df5500f4d1dce107c20df72e0d2959152fca0901676cec1eebf1de39a69dc46ea96442aecd234c9fb4e7618337b0c  btfs-2.24.tar.gz
"
